#pragma once
#include <iostream>
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
using namespace std;

int OpenDev(const std::string dev_path, int flags)
{
    int fd = open(dev_path.c_str(), flags);
    if (fd < 0)
    {
        std::cerr << "open error..." << std::endl;
        return -1;
    }
    return fd;
}
